module.exports = app => {
  const {router} = app;

  router.get('/', async ctx => {
    await ctx.renderClient('home/home.js', {isDev: process.env.EGG_SERVER_ENV});
  });

  router.get('/debug/:date', async ctx => {
    const date = ctx.params.date;
    const data = await app.redis.hgetall('debug:' + date);
    ctx.body = data ? data : '无数据'
  });
};